<template>
	<view></view>
</template>

<script>
	let app = getApp()
	import {
		goPage
	} from '@/libs/order.js'
	export default {
		name: 'e_activity',
		props: {
			dataConfig: {
				type: Object,
				default: () => {}
			},
			activeName: {
				type: String,
				default: ''
			}
		},
		watch: {
			activeName: {
				handler(nVal, oVal) {
					if (nVal == this.name && app.globalData.isIframe) {
						this.isBorader = true
					} else {
						this.isBorader = false
					}
				},
				deep: true
			}
		},
		data() {
			return {
				activity: [],
				activityOne: {},
				isBorader:false,
				name: this.$options.name
			}
		},
		created() {
			let data = JSON.parse(JSON.stringify(this.dataConfig.imgList.list))
			this.activityOne = this.dataConfig.imgList.list[0]
			data.splice(0, 1)
			this.activity = data
		},
		methods: {
			gopage(url) {
				goPage().then(res => {
					if (url.indexOf("http") != -1) {
						// #ifdef H5
						location.href = url
						// #endif
					} else {
						if (['/pages/goods_cate/goods_cate', '/pages/order_addcart/order_addcart', '/pages/user/index'].indexOf(url) ==
							-1) {
							uni.navigateTo({
								url: url
							})
						} else {
							uni.switchTab({
								url: url
							})
						}
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	.specialArea {
		padding: 30rpx;
	}

	.specialArea .assemble {
		width: 260rpx;
		height: 260rpx;
		position: relative;
	}

	.specialArea .assemble image {
		width: 100%;
		height: 100%;
		border-radius: 5rpx;
	}

	.specialArea .assemble .text {
		position: absolute;
		top: 37rpx;
		left: 22rpx;
	}

	.specialArea .name {
		font-size: 30rpx;
		color: #fff;
	}

	.specialArea .infor {
		font-size: 22rpx;
		color: rgba(255, 255, 255, 0.8);
		margin-top: 5rpx;
	}

	.specialArea .list {
		height: 260rpx;
		width: 416rpx;
	}

	.specialArea .item {
		width: 100%;
		height: 124rpx;
		position: relative;
	}

	.specialArea .item img {
		width: 100%;
		height: 100%;
	}

	.specialArea .item .text {
		position: absolute;
		top: 23rpx;
		left: 28rpx;
	}

	.specialArea .list {
		height: 260rpx;
		width: 416rpx;
	}

	.specialArea .item {
		width: 100%;
		height: 124rpx;
		position: relative;
	}

	.specialArea .item image {
		width: 100%;
		height: 100%;
	}

	.specialArea .item .text {
		position: absolute;
		top: 23rpx;
		left: 28rpx;
	}
</style>
